HubspotManager

HubspotManager class enable and disable logs @see enableLogs& @seedisableLogs It manages the configuration changes from the assets file @see configure It also builds chatURL @see chatUrl It stores the email and token in memory @see setUserIdentity It sets chat properties for chat session @see getChatProperties& @see setChatProperties It sends the PushToken to Hubspot API @see setPushToken

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun chatURL(chatFlow: String? = null, pushData: PushNotificationChatData? = null): String

Create chat URL for hubspot webview

Link copied to clipboard
fun configure()

It creates Hubspot configurations When user uses the demo app, it always call this method to configure with the hubspot sdk. This is the only method which is handled by the application.

Link copied to clipboard
suspend fun deleteDeviceToken(pushToken: String)

This method is used for deleting the push token via Hubspot API

Link copied to clipboard

Disable the logs

Link copied to clipboard

Enable the logs

Link copied to clipboard

Getter method for the current chat session properties

Link copied to clipboard

Getter method for hubspot DefaultChatFlow

Link copied to clipboard

Getter method for hubspot Environment

Link copied to clipboard

Getter method for hubspot Hublet

Link copied to clipboard

Getter method for hubspot portal id

Link copied to clipboard

This method is used for getting a PushToken from the shared preferences

Link copied to clipboard
suspend fun logout()
Link copied to clipboard
fun setChatProperties(keyValuePair: Map<String, String>)

Sets properties for current chat session

Link copied to clipboard
suspend fun setPushToken(pushToken: String)

This method is used for sending the token via Hubspot API

Link copied to clipboard
fun setUserIdentity(email: String, token: String)

Set the user identity token and email. These will be included when starting a chat session to identify the users. These values are only stored in memory and aren't persisted. These values are set when user use the setUserIdentity with passing email and token

Link copied to clipboard
fun startChat()

Shares the logs with chat started